//
//  AddCaseCell.m
//  FastDoctor
//
//  Created by 程建良 on 16/7/8.
//  Copyright © 2016年 sc. All rights reserved.
//

#import "AddCaseCell.h"
@interface AddCaseCell()

@property (nonatomic,weak)UIImageView *selectImageView;
@end
@implementation AddCaseCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    }
    return self;
}

-(void)setupUI{
    [self setupSelectLabel];
    [self setupSelectImageView];
}
-(void)setupSelectLabel{
    UILabel *label = [[UILabel alloc]init];
    self.selectLabel = label;
    label.textColor = [UIColor grayColor];
    [label sizeToFit];
    [self.contentView addSubview:label];
}
-(void)setupSelectImageView{
    UIImageView *imageView = [[UIImageView alloc]init];
    imageView.image = [UIImage imageNamed:@"arrow_right_black"];
    [imageView sizeToFit];
    self.selectImageView = imageView;
    [self.contentView addSubview:imageView];
}
-(void)layoutSubviews{
    [super layoutSubviews];
    [self.selectImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.contentView.mas_centerY);
        make.right.offset(-15);
    }];
    [self.selectLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.contentView.mas_centerY);
        make.right.mas_equalTo(self.selectImageView.mas_left).offset(-5);
    }];
    
}

@end
